/**
 * Created by gongxun on 17/3/2.
 */

var HallPushMessageResponse = function(){
    var that = new GameResponseBase();

    that.handle = function (binary, msgid) {
        that.loadMessage(binary, msgid);

        var Msg_type = that.msg.Msg_type;
        if (Msg_type == 0 || Msg_type == 1 || Msg_type == 2 || Msg_type == 3){
            mo.eventHelper.dispatch_1("PushMessageMarquee", [that.msg.Context]);
            if (Msg_type == 2){
                var contexts = [];
                for (var i = 0; i < 9; i++){
                    contexts.push(that.msg.Context);
                }
                mo.eventHelper.dispatch_1("PushMessageMarquee", contexts);
            }

        }else if (Msg_type == 4 || Msg_type == 5){
            mo.showMsgDialogText(that.msg.Context);
        }
    };

    return that;
};
